package com.sims.action.StudentPosition;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.sims.bean.StudentPosition;
import com.sims.beanEnhanced.StudentStudentPosition;
import com.sims.service.StudentPositionService;
import com.sims.util.ActionEnhanced;
import com.sims.util.Constant;

public class FindClassStudentPositionAction extends ActionEnhanced {
	
	//private Class Tclass;
	private List<StudentStudentPosition> studentPositionList = new ArrayList<StudentStudentPosition>();
	
	@Autowired
	private StudentPositionService studentPositionService;
//	public Class getTclass() {
//		return Tclass;
//	}
//	public void setTclass(Class tclass) {
//		Tclass = tclass;
//	}
	public List<StudentStudentPosition> getStudentPositionList() {
		return studentPositionList;
	}
	public void setStudentPositionList(List<StudentStudentPosition> studentPositionList) {
		this.studentPositionList = studentPositionList;
	}
	@Override
	public String execute() {
		
		result = studentPositionService.findClassStudentPosition(studentPositionList);
		if (result.containsKey(Constant.SUCCESS)) {
			System.out.println("success");
			return SUCCESS;
		}
		return ERROR;
	}
}
